package com.scoring.system.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.scoring.system.mapper.JurisdictionMapper;
import com.scoring.system.pojo.Jurisdiction;
import com.scoring.system.service.JurisdictionService;
@Service("jurisdictionService")
public class JurisdictionServiceImpl implements JurisdictionService {
	
	@Resource
	private JurisdictionMapper jdDao;

	@Override
	public int deleteJurisdiction(int id) {
		return jdDao.deleteByPrimaryKey(id);
	}

	@Override
	public int saveJurisdiction(Jurisdiction record) {
		return jdDao.insert(record);
	}

	@Override
	public Jurisdiction getJurisdictionById(int id) {
		return jdDao.selectByPrimaryKey(id);
	}

	@Override
	public Jurisdiction getJurisdictionByName(String name) {
		return jdDao.selectByName(name);
	}

	@Override
	public int updateJurisdiction(Jurisdiction record) {
		return jdDao.updateByPrimaryKeySelective(record);
	}

}
